<template>
	<el-col :span="options.span || 22">
		<el-form-item :label="options.label" :prop="options.prop">
			<el-switch v-on="$listeners" v-bind="$attrs"  v-model="inputVal" :active-text="options.activeText" :inactive-text="options.inactiveText"
				:active-value="options.activeValue" :inactive-value="options.inactiveValue" :active-color="options.activeColor"
				:inactive-color="options.inactiveColor"> </el-switch>
		</el-form-item>
	</el-col>
</template>

<script>
	// activeText:String,//	switch 打开时的文字描述	string	—	—
	// inactiveText:String,//	switch 关闭时的文字描述	string	—	—
	// activeValue:String,//	switch 打开时的值	boolean / string / number	—	true
	// inactiveValue:String,//	switch 关闭时的值	boolean / string / number	—	false
	// activeColor:String,//	switch 打开时的背景色	string	—	#409EFF
	// inactiveColor:String,//	switch 关闭时的背景色	string	—	#C0CCDA
	export default {

		props: {
			value: null,
			options: Object,
		},
		computed: {
			inputVal: {
				get: function() {
					return this.value;
				},
				set: function(e) {
					this.$emit("input", e);
				},
			},
		},
	};
</script>

<style>
</style>